home *** CD-ROM | disk | FTP | other *** search
/ CD World 1998 January / CD World - Ocak 1998.iso / misc / dbase55 / disk6 / samples1.pak / SAMPLES.TXT < prev    next >
Text File  |  1996-01-05  |  15KB  |  446 lines

  1.              Copyright (c) 1991-1994 Borland International, Inc.
  2.                             All Rights Reserved.
  3.  
  4. This document describes the sample program files, which are installed
  5. in the SAMPLES subdirectory.
  6.  
  7. Several programs use the Visual dBASE Form syntax, which lets
  8. you run multiple programs simultaneously. For example, start openform.prg
  9. by either typing DO OPENFORM in the Command window or double-clicking on
  10. its icon in the Navigator.  After the openform form appears, you can
  11. start Winapi.wfm again either through the Command window or Navigator.
  12. You can then switch freely between the two forms.
  13.  
  14. All samples should be run from the <_dbwinhome>\samples directory.
  15.  
  16. There is a SAMPLES.CAT catalog that lists all the samples files described
  17. below.
  18.  
  19. Note:  The files in the samples\extern, and samples\music
  20.        directories are described in extern.txt, and music.txt,
  21.        which are located in the corresponding diretories.
  22.  
  23. ANIMALS.WFM
  24. -----------
  25.  
  26. Files used: ANIMALS.DBF, ANIMALS.DBT, ANIMALS.QBE, ANIMALS.MDX
  27.             BUTTONS.CC
  28.  
  29. This program shows how the Visual dBASE form controls defined on
  30. database fields are related and change as the record pointer changes.  It
  31. also displays imaging commands.  The image displayed is stored in
  32. a binary field in ANIMALS.DBF.  An animal's size will turn red when that
  33. animal has a size of > 10.
  34.  
  35. You can type "Do animals.wfm" in the Command window to run this file,
  36. and then click the Design SpeedBar button to design it. Alternatively,
  37. in the Navigator, you can select the Forms icon, and
  38. right-click the icon for ANIMALS.WFM to SpeedMenu where you can choose
  39. an option.  You can then select Design Form to design the form.
  40. When you want to run the form, click the Run (lightning bolt) SpeedBar
  41. button.
  42.  
  43. *
  44.  
  45.  
  46. ANIMVCR.WFM
  47. -----------
  48.  
  49. Files used: ANIMALS.DBF, ANIMALS.DBT, ANIMALS.QBE, ANIMALS.MDX
  50.             BUTTONS.CC, VCR.CC
  51.  
  52. This program is very similar to Animals.wfm.  It allows you to
  53. visually move around in a table, viewing its contents through form
  54. controls.  The only difference is that Animvcr.wfm uses the custom
  55. control, VCR.CC, for its navigation controls.  Instead of the regular
  56. buttons you see in Animals.wfm, Animvcr.wfm brings up a set of VCR
  57. buttons for moving around in a form.
  58.  
  59. *
  60.  
  61.  
  62.  
  63. BINTREE.PRG
  64. -----------
  65.  
  66. File used:  CLIENTS.DBF
  67.  
  68. This program shows how you can use the Visual dBASE object extensions to
  69. create a binary tree.  It builds a tree of client names, from CLIENTS.DBF,
  70. in alphabetical order.  The tree goes left to right alphabetically, for
  71. example, left child, parent, right child.
  72.  
  73. *
  74.  
  75. BUTTONS.CC
  76. ----------
  77.  
  78. This is a procedure file containing custom control classes for Visual dBASE
  79. forms.  You can use the controls in this file by issuing a SET PROCEDURE
  80. TO within your program, and then using the custom controls as you would
  81. any built-in ones as in: DEFINE CANCELBUTTON C OF THIS....
  82.  
  83. If you are designing a form in the Forms Designer, select
  84. "Set Up Custom Controls" from the "File" menu, and then specify
  85. Buttons.cc on the "dBASE Controls" page. The custom classes defined
  86. in this file will appear on the "Custom" page of the Controls Palette.
  87. You can then add these controls to your form visually and modify their
  88. properties in the Object Inspector and the Procedure Editor.
  89.  
  90. *
  91.  
  92. CAL.WFM
  93. -------
  94.  
  95. This is a simple calculator form.  It allows mathematical calculations,
  96. memory manipulations, and hex/decimal conversions.  The results appear in
  97. the display entry field at the top of the form.  The memory value appears
  98. in the memory entry field at the bottom of the form.
  99.  
  100. You can modify and inspect this form through the Form Designer.
  101.  
  102. *
  103.  
  104. CHANGDIR.PRG
  105. ------------
  106.  
  107. File used:  BUTTONS.CC
  108.  
  109. CHANGDIR.PRG is a tool for changing directories.  It allows you to
  110. traverse a directory tree, select a directory and either change
  111. directories to the one you seleted (by pressing the OK button), or
  112. cancel the program (by pressing the Cancel button).
  113.  
  114. *
  115.  
  116. CONTACT.WFM
  117. -----------
  118.  
  119. Files used: COMPANY.DBF, CONTACT.DBF, CONTACT.DBT, CONTACT.MDX,
  120.             CONTACT.QBE,
  121.             COMPANY.DBT, COMPANY.MDX
  122.             BUTTONS.CC
  123.  
  124. This program relates 2 tables and shows how form controls
  125. work together and change as the record pointer moves in the main
  126. table.  It defines a form with a list box containing the names of
  127. companies, radio buttons with company types, an entry field
  128. showing the contact for the current company (from the Contact
  129. table), and an editor showing notes for that contact (also from
  130. the Contact table).
  131.  
  132. The Close push button closes the form.
  133.  
  134. CONTACT.WFM can be modified through the Form Designer.
  135.  
  136. *
  137.  
  138.  
  139. COUNTRY.WFM
  140. -----------
  141.  
  142. Files used: COUNTRY.DBF, BUTTONS.CC
  143.  
  144. This is a program that shows information about various
  145. european countries as you click on the appropriate country
  146. on the image of the map of Europe.  The program shows
  147. the ability to use "hot" maps in Visual dBASE, and
  148. also illustrates the various uses and types of arrays
  149. you can create in your programs.
  150.  
  151.  
  152. *
  153.  
  154. CUSTOMER.WFM
  155. ------------
  156.  
  157. Files used:  CUSTOMER.DBF, CUSTOMER.DBT, CUSTOMER.MDX,
  158.              CUSTOMER.QBE,
  159.              ORDERS.DBF, ORDERS.MDX, ORDERS.QBE,
  160.              CUSTOMER.MNU, DIVESHOP.BMP,
  161.              BUTTONS.CC
  162.  
  163. This is a form that shows information about different customers
  164. in a company. It also illustrates how you can use transactions
  165. in a Visual dBASE form.  You can move through the existing
  166. customers by selecting the Next/Previous buttons, Cancel to leave
  167. the form, or edit the information about the current customer.
  168.  
  169. You can look at the form in two modes -- View or Edit.  Initially
  170. the form is in View mode, which doesn't allow editing of
  171. information.  To change to Edit mode, choose Customer|Edit from
  172. the menu. Changing information in Edit mode, and moving to another
  173. customer will display a dialog box, which asks if you want to save
  174. the information you just changed. You will not see this dialog box
  175. when moving between records in View mode.
  176.  
  177. This form contains a menu that allows adding or deleting a customer
  178. and searching for a customer based on the NAME index tag.
  179.  
  180. *
  181.  
  182. CUSTORD.WFM
  183. -----------
  184.  
  185. Files used:  CUSTORD.QBE
  186.              CUSTOMER.DBF, CUSTOMER.DBT, CUSTOMER.MDX,
  187.              ORDERS.DBF, ORDERS.MDX,
  188.              LINEITEM.DBF, LINEITEM.QBE,
  189.              CUSTOMER.MNU, DIVESHOP.BMP, CUSTORD.ICO
  190.              BUTTONS.CC
  191.  
  192. This program displays information about the customers, orders and
  193. order lineitems of the Dive Shop company.  It allows you to add new
  194. customers/orders/lineitems, change information about the existing
  195. ones, and delete them if you want.  The Visual dBASE tabbox control
  196. is used to switch between views of customers, orders and lineitems.
  197. There is also an icon provided for this program which you see when
  198. you minimize the running form.
  199.  
  200. This program illustrates the many UI features of dBASE, as well as
  201. gives an example of a basic transaction based application.  It is
  202. basically a single form version of the Customer.wfm and Orders.wfm
  203. applications.
  204.  
  205. If you have installed the Visual dBASE Compiler, you can build
  206. an executable version of Cutord.wfm by either using Custord.mak
  207. (do Custord.mak), or using the Visual dBASE BUILD command with
  208. the Custord.rsp response file (build from Custord.rsp).
  209.  
  210. *
  211.  
  212.  
  213. DBCLOCK.PRG
  214. -----------
  215.  
  216. Files used:  DBTIMER.VBX, DBCLOCK.BFM
  217.  
  218. This is a simple clock program.  It brings up a form with a time
  219. display.  The time display changes size as you resize the form.
  220. It will always be centered in the form.  There is also a menu that
  221. allows changing the font and color properties of the time display,
  222. as well as the format of the displayed time (12/24 hour).
  223.  
  224. *
  225.  
  226. EQUIPMNT.WFM
  227. ------------
  228.  
  229. Files used:  EQUIPMNT.WFM, GETFLTS.WFM, CHANGEQ.WFM,
  230.              EQUIPMNT.QBE, CHANGEQ.QBE,
  231.              FLIGHTS.DBF, FLIGHTS.MDX, AIRCRDB.DBF, AIRCRDB.DBT,
  232.              AIRCRDB.MDX,
  233.              EQUIPMNT.MNU
  234.              EQUIPMNT.H,
  235.              AIRBRLND.BMP, AIRBRLN2.BMP
  236.  
  237. Note:        There is also an EQUIPMNT.CAT catalog that lists the
  238.              above files.
  239.  
  240. This is an application that lets you change airplanes for different
  241. flights of the Airborland airlines.
  242.  
  243. It brings up a form with a menu that lets you select the flight
  244. for which you want to change the equipment.  After you select the
  245. flight, you will see a browse of all flights corresponding to your
  246. selection, an image of the plane used for the flight currently
  247. highlighted in the browse, and a button you can press to actually
  248. change the plane.
  249.  
  250. Pressing the Change Equipmnt button displays another form with a
  251. list box of different plane names and the image corresponding to the
  252. selected plane type.  You can select an airplane from here, and the
  253. current flight will be modified to use the new plane.
  254.  
  255. To exit the program, choose File|Exit.
  256.  
  257. *
  258.  
  259. EVENT.PRG
  260. ---------
  261.  
  262. This is a program that shows how you can use the different event
  263. handlers attached to a form to detect combinations of mouse and
  264. keyboard key presses.  It displays two forms.  One of them you can
  265. resize by dragging the mouse -- the form will follow (without you
  266. having to drag the border).  The other one lets you create as many
  267. buttons as you want, move them around and align them by combining
  268. different key click combinations.
  269.  
  270. *
  271.  
  272. FONT.WFM
  273. --------
  274.  
  275. This program shows how to set different fonts and colors for the form
  276. controls. Fonts can be set for all the form controls.  You can see
  277. the relative sizes of the available fonts, and also see how you can
  278. visually improve your forms by varying the fonts of the defined controls.
  279.  
  280.  
  281. *
  282.  
  283.  
  284. LINKLIST.PRG
  285. ------------
  286.  
  287. This is a simple program that creates a linked list of integers from 1 to
  288. 10. Each link has a value and next properties.  After the list is created,
  289. a function is called to step through it and display the contents of each
  290. link.
  291.  
  292. *
  293.  
  294. NAMEINFO.WFM
  295. ------------
  296.  
  297. Files used:  NAMES.DBF, NAMES.DBT, NAMES.QBE,
  298.              NAMESRCH.WFM
  299.              BUTTONS.CC
  300.  
  301. This program shows the DDE capabilities of Visual dBASE.  It establishes
  302. a link with WordPerfect to create a "Thank you" letter for customers
  303. that had purchased software.
  304.  
  305. *
  306.  
  307.  
  308. OPENFORM.PRG
  309. ------------
  310.  
  311. Files used:  COUNTRY.DBF, COUNTRY.DBT, COUNTRY.MDX,
  312.              BUTTONS.CC
  313.  
  314. This program shows how the OPEN FORM command works. OPEN FORM displays a
  315. form and enables the controls contained on that form. It  does not stop
  316. program control flow.
  317.  
  318. In this program, you can select a country in one form, then view
  319. information about that country in a second form.  You can then select
  320. more countries from the first form, and display forms with information
  321. about them. All information forms remain onscreen until you close them.
  322.  
  323. *
  324.  
  325. ORDERS.WFM
  326. ----------
  327.  
  328. Files used:  ORDERS.QBE, ORDERS.DBF, ORDERS.MDX,
  329.              LINEITEM.DBF, LINEITEM.MDX
  330.              CUSTOMER.DBF, CUSTOMER.DBT, CUSTOMER.MDX,
  331.              ORDERS.MNU,
  332.              DIVESHOP.BMP,
  333.              BUTTONS.CC
  334.  
  335. This form displays information about a customer order. It uses a format
  336. similar to Customer.wfm.  It has buttons that let you move around in the
  337. Orders table.  The Orders table is related to the Customer and Lineitems
  338. tables.  Each order could have many line items ordered.  These items are
  339. displayed in a browse control on the form that changes as you move
  340. through the orders.  There is also a customer number displayed for
  341. each order.
  342.  
  343. There is also a menu attached to this form through which you can add or
  344. delete an order, or search for an order based on the current index,
  345. order_no
  346.  
  347. *
  348.  
  349. PAINT.WFM
  350. ---------
  351.  
  352. Files used:  BUTTONS.CC
  353.  
  354. This program demonstrates the use of the Paintbox and Shape
  355. Visual dBASE controls by allowing you to select an image from
  356. a table or from a .bmp file, and combine it with an
  357. existing image on the form, or the previously modified version
  358. of the same bitmap saved in the paintbox on the form.
  359.  
  360. The Windows API BitBlt() function is used to combine images
  361. in a paintbox control.
  362.  
  363. *
  364.  
  365. SAMPLE.CFM
  366. ----------
  367.  
  368. Files used:  BUTTONS.CC
  369.  
  370. This is a custom form file.  It contains the definition of the custom
  371. form class SearchFormClass, which defines a basic search form, and is
  372. used by Search.wfm.
  373.  
  374. *
  375.  
  376.  
  377. SEARCH.WFM
  378. ----------
  379.  
  380. Files used:  BUTTONS.CC, SAMPLE.CFM
  381.  
  382. This is a generic search form that allows you to enter a value, and then
  383. save it by pressing Ok, or ignore it by pressing Cancel.  The value is
  384. saved as a property of the form, so that the form calling Search.wfm can
  385. search and perform some action based on the value.
  386.  
  387. This form is inherited from SearchFormClass, which is defined in
  388. SAMPLE.CFM.
  389.  
  390. *
  391.  
  392. SWITCH.WFM
  393. ----------
  394.  
  395. Files used:  SWITCH.VBX, SWITCH.BFM
  396.  
  397. This form illustrates how to use VBX controls in Visual dBASE forms.
  398. It displays a simple two-state switch that changes the color of the form
  399. and the caption of the switch control when it's turned on or off.
  400.  
  401. *
  402.  
  403. PICTURES.WFM
  404. ------------
  405.  
  406. Files used:  PICTURES.DBF, PICTURES.DBT, PICTURES.MDX, PICTURES.QBE
  407.  
  408. Note:        All ole field values contain embedded data.  Windows
  409.              saves the full path with each linked file, so only
  410.              embedded data can be used if the files are to be portable.
  411.  
  412. This program shows how the form controls defined on table
  413. fields are related and change as the record pointer changes.  It also
  414. shows how you can view OLE fields in Visual dBASE forms.
  415.  
  416. A form is defined with a list box of image names and an OLE control
  417. containing an image you can modify through Paintbrush. The OLE control
  418. corresponds to the currently highlighted name.  There is also a sound
  419. button that will play a sound corresponding to the image.  Both the OLE
  420. image and the sound are stored in binary fields in Pictures.dbf.
  421. Double-clicking on the OLE control allows you to edit it through
  422. Paintbrush.
  423.  
  424. You can use the Form Designer to modify and run this form file.
  425.  
  426. *
  427.  
  428. WINAPI.WFM
  429. ----------
  430.  
  431. Files used: SYSINFO.WFM, BUTTONS.CC
  432.  
  433. Calls:  GetVersion(),GetWinFlags(),GetModuleUsage(),GetModuleHandle(),
  434.         ShowWindow(),GetFreeSpace(),messagebox(),SystemParametersInfo(),
  435.         GetWindowText(),CloseWindow(),OpenIcon(),GetWindowsDirectory(),
  436.         GetPrivateProfileString()
  437.         (external functions)
  438.  
  439. This program gives extensive examples of how you can use the API
  440. interface to access Windows functions and obtain useful information.
  441. It displays a form that lets you select what external functions or groups
  442. of functions you would like to execute, and then executes your selection.
  443. You can get various types of system information, display Windows dialog
  444. boxes, minimize or maximize Visual dBASE, and much more.
  445.  
  446.